import region from '@/views/common/regionEdit'

export default function createAddSchema(api, canAccessSuperData){
    return {
        type: 'form',
        title: '',
        mode: 'horizontal',
        actions: [],
        wrapWithPanel: false,
        canAccessSuperData: canAccessSuperData,
        messages:{
            validateFailed:''
        },
        api: api,
        body:[
        {
            type: 'input-text',
            name: 'orgName',
            label: '医保局名称',
            required: true,
            validationErrors: {
                isRequired: '请输入医保局名称'
            }
        },
        {
            type: 'input-text',
            name: 'orgCode',
            label: '编码'
        },
        {
            type: 'select',
            name: 'parentId',
            label: '上级医保局',
            clearable: true,
            autoComplete: '/upms/admin/org/nhsa/select?orgName=${term}&selectedId=${parentId}',
            placeholder: '请选择上级医保局'
        },
        region,
        {
            type: 'hidden',
            name: 'id'
        }]
    }
}